import { createRouter, createWebHashHistory } from "vue-router";
// import OlExample1 from "../components/OlExample1.vue";
import HelloWord from "../components/HelloWorld.vue";

const router = createRouter({
     // 4. 采用hash 模式
    history: createWebHashHistory(),
    // 采用 history 模式
    // history: createWebHistory(),
    routes: [
        {
            path: "/",
            component: HelloWord
        },
        {
            path: "/basedemo",
            component: import("../components/OlExample1.vue")
        },
        {
            path: "/polygon",
            component: import("../components/OlExample2.vue")
        },
        {
            path: "/shadow",
            component: () => import("../components/OlExample3.vue")
        },
        {
            path: "/graticule",
            component: () => import("../components/OlExample4.vue")
        },
        {
            path: "/heatmap",
            component: () => import("../components/OlExample5.vue")
        },
        {
            path: "/imagelayer",
            component: () => import("../components/OlExample6.vue")
        },
        {
            path: "/vectorlayer",
            component: () => import("../components/OlExample7.vue")
        },
        {
            path: "/test2",
            component: () => import("../components/OlExample8.vue")
        },
        {
            path: "/test3",
            component: () => import("../components/OlExample9.vue")
        },
        {
            path: "/test4",
            component: () => import("../components/OlExample10.vue")
        },
        {
            path: "/test5",
            component: () => import("../components/OlExample11.vue")
        },
        {
            path: "/test6",
            component: () => import("../components/OlExample12.vue")
        },
        {
            path: "/test7",
            component: () => import("../components/OlExample13.vue")
        },
        {
            path: "/test8",
            component: () => import("../components/OlExample14.vue")
        },
        {
            path: "/test9",
            component: () => import("../components/OlExample15.vue")
        },
        {
            path: "/test16",
            component: () => import("../components/OlExample16.vue")
        },
        {
            path: "/test17",
            component: () => import("../components/OlExample17.vue")
        },
        {
            path: "/heat",
            component: () => import("../components/HeatMap.vue")
        },
        {
            path: "/jiantou",
            component: () => import("../components/Jiantou.vue")
        }
        
    ]
})

export default router;